package SYNCH_NESTEDS;

public class Example {
    public static class MyClass {
        static public synchronized List getElements() {
            return internalGetElements();
        }
        static synchronized List internalGetElements() {
            List list = new ArrayList();
            // calculate and return list of elements
            return list;
        }
        // ...
    }
}
